function con_labeled_data()
clc;
clear;
addpath('data');
filelist = dir('data/*.mat');
name = cellfun(@(x)x(1:length(x)),{filelist.name},'UniformOutput',false); 
for i=1:length(name)
    load(name{i});
    y=label';
    n = 1:length(y);
    ratio = sum(y==1)/length(y);
    pos = find(y==1);
    neg = find(y==-1);
    labeled_data = 100;   %
    pos_num = ceil(labeled_data*ratio);
    neg_num = labeled_data - pos_num;
    T=50;
    for j =1:T
        indx_pos = randperm(length(pos),pos_num);
        indx_neg = randperm(length(neg),neg_num);
        dat = [pos(indx_pos)' neg(indx_neg)'];
        l_ind{j} = dat;
    end
    l_ind = l_ind';
    save(['data_ssl_100/',name{i}],'l_ind');  %
    
end
end